public class NB3AgentSet
extends java.lang.Object
implements java.lang.Iterable<java.lang.Integer>
Modifier and Type | Field and Description |
---|---|
static int |
MAX_SIZE |
Constructor and Description |
---|
NB3AgentSet()
Creates the empty set.
|
NB3AgentSet(NB3AgentSet original)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(int agentID) |
void |
addAll(NB3AgentSet otherSet) |
void |
clear() |
boolean |
contains(int agentID) |
boolean |
containsAll(NB3AgentSet otherSet) |
NB3AgentSet |
copy()
Makes a copy of this set.
|
boolean |
isEmpty() |
java.util.Iterator<java.lang.Integer> |
iterator() |
void |
makeEqualTo(NB3AgentSet otherSet)
Removes all elements of this set and adds all elements of the given set.
|
void |
remove(int agentID) |
void |
removeAll(NB3AgentSet otherSet) |
int |
size() |
NB3AgentSet |
subtract(NB3AgentSet otherSet)
Creates a new Agent Set that contains all agents in this set that are not in the given other set.
|
java.lang.String |
toString() |
public static final int MAX_SIZE
public NB3AgentSet()
public NB3AgentSet(NB3AgentSet original)
original
- public void add(int agentID)
public boolean contains(int agentID)
public void remove(int agentID)
public void addAll(NB3AgentSet otherSet)
public boolean containsAll(NB3AgentSet otherSet)
public void removeAll(NB3AgentSet otherSet)
public void clear()
public boolean isEmpty()
public void makeEqualTo(NB3AgentSet otherSet)
other
- public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public NB3AgentSet copy()
public NB3AgentSet subtract(NB3AgentSet otherSet)
otherSet
- public java.util.Iterator<java.lang.Integer> iterator()
iterator
in interface java.lang.Iterable<java.lang.Integer>